package DesignPatern.A14_迭代器模式.QSB.A03_抽象模式;

import java.util.Vector;

/**
 * @Author: Du
 * @Date: 2021/8/2 8:43
 * 具体容器
 */
public class ConcreteAggregate implements Aggregate
{
    private Vector vector = new Vector();
    
    @Override
    public void add(Object o)
    {
        vector.add(o);
    }
    
    @Override
    public void remove(Object o)
    {
        this.remove(o);
    }
    
    @Override
    public Iterator iterator()
    {
        return new ConcreteIterator(this.vector);
    }
}
